import { Injectable } from '@angular/core';
import { HttpClientService } from '../../../../services/http-client.service';
@Injectable()
export class YhpService {
	constructor(
		public httpClient: HttpClientService
	) { }
	//查询分页列表
	list(getBody) {
		// +'&pageSize='+item.pageSize+'&pageIndex='+item.pageIndex+'&sFundStatus='+item.sFundStatus
		return this.httpClient.get('/pms/v1/publicissue/publicBasicList', getBody);
	}
	//删除产品
	del(putBody) {
		return this.httpClient.put('/pms/v1/publicissue/publicBasicDel', putBody);
	}
	//判断是否变更注册
	isRegistrationChange(getBody) {
		return this.httpClient.get('/pms/v1/publicissue/checkChange/' + getBody.nFundNo + "?sChangeType=" + getBody.sChangeType);
	}
	//变更注册修改信息
	editRegistrationChange(postBody) {
		return this.httpClient.post('/pms/v1/publicissue/changeRegistration', postBody);
	}
	//延期募集
	delayCollect(putBody) {
		return this.httpClient.put('/pms/v1/publicissue/auditInformation', putBody);
	}
	//查询单个产品审核信息
	getSingleCheckInfo(item) {
		return this.httpClient.get('/pms/v1/publicissue/publicissueExamine/' + item.nFundNo);
	}
	// 查询单个产品基础信息
	getSingleProductInfo(item) {
		return this.httpClient.get('/pms/v1/publicissue/publicBasic/' + item.nFundNo);

	}
	// 获取附件树
	getFileTree(getBody) {
		return this.httpClient.get('/pms/v1/common/fundFile/attachTree', getBody);
	}
	// 获取文件历史版本
	getFileHistory(getBody) {
		return this.httpClient.get('/pms/v1/common/fundFile/versions/' + getBody);
	}
	// 删除附件
	delFile(putBody) {
		return this.httpClient.put('/pms/v1/common/fundFile/file/' + putBody);
	}
	// 修改附件名
	changeFileName(nAttachNo, newFileName) {
		return this.httpClient.put('/pms/v1/common/fundFile/file?&nAttachNo=' + nAttachNo + '&attachName=' + newFileName);
	}
	// 基金经理
	getManagerList() {
		return this.httpClient.get('/pms/v1/common/manager/managerList');
	}
}
